/*  1:   */ package org.jetbrains.lang.manifest.psi.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.impl.source.tree.LeafElement;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.lang.manifest.psi.Header;
import org.jetbrains.lang.manifest.psi.HeaderValue;
import org.jetbrains.lang.manifest.psi.ManifestToken;
import org.jetbrains.lang.manifest.psi.ManifestTokenType;

import java.util.List;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */
/* 14:   */
/* 15:   */
/* 16:   */ 
/* 17:   */ public class HeaderImpl
/* 18:   */   extends ASTWrapperPsiElement
/* 19:   */   implements Header
/* 20:   */ {
/* 21:   */   public HeaderImpl(@NotNull ASTNode paramASTNode)
/* 22:   */   {
/* 23:44 */     super(paramASTNode);
/* 24:   */   }
/* 25:   */   
/* 26:   */   @NotNull
/* 27:   */   public String getName()
/* 28:   */   {
/* 29:50 */     String tmp9_4 = getNameElement().getText();
/* 30:50 */     if (tmp9_4 == null) {
/* 31:50 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/psi/impl/HeaderImpl", "getName" }));
/* 32:   */     }
/* 33:50 */     return tmp9_4;
/* 34:   */   }
/* 35:   */   
/* 36:   */   public PsiElement setName(@NotNull String paramString)
/* 37:   */     throws IncorrectOperationException
/* 38:   */   {
/* 39:55 */     if (paramString == null) {
/* 40:55 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/lang/manifest/psi/impl/HeaderImpl", "setName" }));
/* 41:   */     }
/* 42:55 */     ((LeafElement)getNameElement().getNode()).replaceWithText(paramString);
/* 43:56 */     return this;
/* 44:   */   }
/* 45:   */   
/* 46:   */   @NotNull
/* 47:   */   public ManifestToken getNameElement()
/* 48:   */   {
/* 49:62 */     ManifestToken localManifestToken = (ManifestToken)getNode().findChildByType(ManifestTokenType.HEADER_NAME);
/* 50:63 */     assert (localManifestToken != null) : getText(); ManifestToken 
/* 51:64 */       tmp39_38 = localManifestToken;
/* 52:64 */     if (tmp39_38 == null) {
/* 53:64 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/psi/impl/HeaderImpl", "getNameElement" }));
/* 54:   */     }
/* 55:64 */     return tmp39_38;
/* 56:   */   }
/* 57:   */   
/* 58:   */   @Nullable
/* 59:   */   public HeaderValue getHeaderValue()
/* 60:   */   {
/* 61:70 */     return (HeaderValue)PsiTreeUtil.getChildOfType(this, HeaderValue.class);
/* 62:   */   }
/* 63:   */   
/* 64:   */   @NotNull
/* 65:   */   public List<HeaderValue> getHeaderValues()
/* 66:   */   {
/* 67:76 */     List tmp6_3 = PsiTreeUtil.getChildrenOfTypeAsList(this, HeaderValue.class);
/* 68:76 */     if (tmp6_3 == null) {
/* 69:76 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/lang/manifest/psi/impl/HeaderImpl", "getHeaderValues" }));
/* 70:   */     }
/* 71:76 */     return tmp6_3;
/* 72:   */   }
/* 73:   */   
/* 74:   */   public String toString()
/* 75:   */   {
/* 76:81 */     return "Header:" + getName();
/* 77:   */   }
/* 78:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.lang.manifest.psi.impl.HeaderImpl

 * JD-Core Version:    0.7.0.1

 */